package com.zcup.designer.contribute.singleton;

public class SingleDog {
    //    private static final SingleDog INSTANCE = new SingleDog();
//
//    public static SingleDog getInstance() {
//        return INSTANCE;
//    }
//    private static SingleDog INSTANCE = null;

    //    public static SingleDog getInstance() {
//        if (INSTANCE == null) {
//            INSTANCE = new SingleDog();
//        }
//        return INSTANCE;
//    }
    static class Inner {
        private static final SingleDog INSTANCE = new SingleDog();
    }
    public static SingleDog getInstance(){
        return Inner.INSTANCE;
    }
    //enum INSTANCE

    private String id;

    private SingleDog() {
    }


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
}
